<template>
  <van-nav-bar
    @click="go"
    title="全部订单"
    left-text=""
    left-arrow
    @click-left="onClickLeft"
  />

  <van-tabs
    v-model:active="active"
    title-active-color="rgb(9,182,116)"
    color="rgb(9,182,116)"
  >
    <van-tab title="全部订单">
      <div class="all">
        <div class="order">
          <div class="order-top" style="">
            <div>订单编号：2018016001</div>
            <div style="color: rgb(9, 182, 116)">等待卖家发货</div>
          </div>
          <div class="order-but" style="">
            <div class="order-img">
              <img style="" src="../../imags/103.png" alt="" />
            </div>
            <div class="order-con">
              <div class="name">直发 ecostore/ecostore 椰子香草沐浴露 400m</div>
              <div class="num" style="">共1件产品 合计：<span>￥108</span></div>
            </div>
          </div>
          <div class="ok">
            <van-button round size="small">取消订单</van-button>
          </div>
        </div>
        <div class="order">
          <div class="order-top" style="">
            <div>订单编号：2018016001</div>
            <div style="color: rgb(9, 182, 116)">等待卖家发货</div>
          </div>
          <div class="order-but" style="">
            <div class="order-img">
              <img style="" src="../../imags/103.png" alt="" />
            </div>
            <div class="order-con">
              <div class="name">直发 ecostore/ecostore 椰子香草沐浴露 400m</div>
              <div class="num" style="">共1件产品 合计：<span>￥108</span></div>
            </div>
          </div>
          <div class="ok">
            <van-button round size="small">取消订单</van-button>
          </div>
        </div>
      </div>
    </van-tab>
    <van-tab title="待付款">
      <div class="all">
        <div class="order">
          <div class="order-top" style="">
            <div>订单编号：2018016001</div>
            <div style="color: rgb(9, 182, 116)">等待卖家发货</div>
          </div>
          <div class="order-but" style="">
            <div class="order-img">
              <img style="" src="../../imags/103.png" alt="" />
            </div>
            <div class="order-con">
              <div class="name">直发 ecostore/ecostore 椰子香草沐浴露 400m</div>
              <div class="num" style="">共1件产品 合计：<span>￥108</span></div>
            </div>
          </div>
          <div class="ok">
            <van-button round size="small">取消订单</van-button>
          </div>
        </div>
        <div class="order">
          <div class="order-top" style="">
            <div>订单编号：2018016001</div>
            <div style="color: rgb(9, 182, 116)">等待卖家发货</div>
          </div>
          <div class="order-but" style="">
            <div class="order-img">
              <img style="" src="../../imags/103.png" alt="" />
            </div>
            <div class="order-con">
              <div class="name">直发 ecostore/ecostore 椰子香草沐浴露 400m</div>
              <div class="num" style="">共1件产品 合计：<span>￥108</span></div>
            </div>
          </div>
          <div class="ok">
            <van-button round size="small">取消订单</van-button>
          </div>
        </div>
      </div>
    </van-tab>
    <van-tab title="待发货">
      <div class="all">
        <div class="order">
          <div class="order-top" style="">
            <div>订单编号：2018016001</div>
            <div style="color: rgb(9, 182, 116)">等待卖家发货</div>
          </div>
          <div class="order-but" style="">
            <div class="order-img">
              <img style="" src="../../imags/103.png" alt="" />
            </div>
            <div class="order-con">
              <div class="name">直发 ecostore/ecostore 椰子香草沐浴露 400m</div>
              <div class="num" style="">共1件产品 合计：<span>￥108</span></div>
            </div>
          </div>
          <div class="ok">
            <van-button round size="small">取消订单</van-button>
          </div>
        </div>
        <div class="order">
          <div class="order-top" style="">
            <div>订单编号：2018016001</div>
            <div style="color: rgb(9, 182, 116)">等待卖家发货</div>
          </div>
          <div class="order-but" style="">
            <div class="order-img">
              <img style="" src="../../imags/103.png" alt="" />
            </div>
            <div class="order-con">
              <div class="name">直发 ecostore/ecostore 椰子香草沐浴露 400m</div>
              <div class="num" style="">共1件产品 合计：<span>￥108</span></div>
            </div>
          </div>
          <div class="ok">
            <van-button round size="small">取消订单</van-button>
          </div>
        </div>
      </div></van-tab
    >
    <van-tab title="待收货">
      <div class="all">
        <div class="order">
          <div class="order-top" style="">
            <div>订单编号：2018016001</div>
            <div style="color: rgb(9, 182, 116)">等待卖家发货</div>
          </div>
          <div class="order-but" style="">
            <div class="order-img">
              <img style="" src="../../imags/103.png" alt="" />
            </div>
            <div class="order-con">
              <div class="name">直发 ecostore/ecostore 椰子香草沐浴露 400m</div>
              <div class="num" style="">共1件产品 合计：<span>￥108</span></div>
            </div>
          </div>
          <div class="ok">
            <van-button round size="small">取消订单</van-button>
          </div>
        </div>
        <div class="order">
          <div class="order-top" style="">
            <div>订单编号：2018016001</div>
            <div style="color: rgb(9, 182, 116)">等待卖家发货</div>
          </div>
          <div class="order-but" style="">
            <div class="order-img">
              <img style="" src="../../imags/103.png" alt="" />
            </div>
            <div class="order-con">
              <div class="name">直发 ecostore/ecostore 椰子香草沐浴露 400m</div>
              <div class="num" style="">共1件产品 合计：<span>￥108</span></div>
            </div>
          </div>
          <div class="ok">
            <van-button round size="small">取消订单</van-button>
          </div>
        </div>
      </div></van-tab
    >
    <van-tab title="待评价">
      <div class="all">
        <div class="order">
          <div class="order-top" style="">
            <div>订单编号：2018016001</div>
            <div style="color: rgb(9, 182, 116)">等待卖家发货</div>
          </div>
          <div class="order-but" style="">
            <div class="order-img">
              <img style="" src="../../imags/103.png" alt="" />
            </div>
            <div class="order-con">
              <div class="name">直发 ecostore/ecostore 椰子香草沐浴露 400m</div>
              <div class="num" style="">共1件产品 合计：<span>￥108</span></div>
            </div>
          </div>
          <div class="ok">
            <van-button round size="small">取消订单</van-button>
          </div>
        </div>
        <div class="order">
          <div class="order-top" style="">
            <div>订单编号：2018016001</div>
            <div style="color: rgb(9, 182, 116)">等待卖家发货</div>
          </div>
          <div class="order-but" style="">
            <div class="order-img">
              <img style="" src="../../imags/103.png" alt="" />
            </div>
            <div class="order-con">
              <div class="name">直发 ecostore/ecostore 椰子香草沐浴露 400m</div>
              <div class="num" style="">共1件产品 合计：<span>￥108</span></div>
            </div>
          </div>
          <div class="ok">
            <van-button round size="small">取消订单</van-button>
          </div>
        </div>
      </div>
    </van-tab>
  </van-tabs>
</template>
<script setup>
import { ref } from "vue";
import { useRouter } from "vue-router";
import { getMyOrderList } from "@/api/order";
const active = ref(0);
const router = useRouter();
const go = () => {
  router.push({
    name: "my",
  });
};
getMyOrderList().then((res) => {
  console.log(res);
});
</script>
<style>
.all {
  padding-top: 1px;
  background: #f4f4f4;
}
.order {
  padding: 15px 0;
  background: white;
  margin-top: 10px;
}
.name {
  width: 80%;
  font-size: 13px;
}
.order-img img {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  margin-right: 20px;
}
.ok,
.num {
  padding-top: 10px;
  text-align: right;
  font-size: 13px;
}
.num span {
  font-size: 16px;
}
.ok {
  padding: 0 10px;
}
.order-top,
.order-but {
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
}
.order-top {
  border-bottom: #f4f4f4 1px solid;
  padding-bottom: 10px;
}
.order-but {
  padding-top: 10px;
}
</style>
